package cn.kgc.springmvc02.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/5/5
 * @Description:  处理和用户相关所有请求    /user/select
 */
@Controller
@RequestMapping("user")
public class UserController  {

    //  查询  String  视图名   RequestMapping  可以配置多路径  value  String[]
    @RequestMapping(value = {"select","list"},method = {RequestMethod.POST,RequestMethod.GET})
    public String  select(){

        return "user";
    }


    // 删除
    @RequestMapping("delete")
    public String  delete(int id){
        System.out.println("id = " + id);
        return "user";
    }


}
